/*
 * =====================================================================================
 *
 *       Filename:  cl_poller.hxx
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  03/30/2011 01:18:11 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Chen Ken (Ken), zlchen.ken@gmail.com
 *        Company:  EMC
 *
 * =====================================================================================
 */

#ifndef _CL_POLLER_HXX_
#define _CL_POLLER_HXX_

#include <string>
#include "cl_channel.hxx"

namespace neo
{
class CLPoller
{
public:
  virtual ~CLPoller();
	bool poll(long millisecs, CLChannelList& chs);
	bool add(CLChannel* ch);	
	bool remove(CLChannel* ch);
	bool modify(CLChannel* ch);

private:
	virtual bool doPoll(long msec, CLChannelList& chs) = 0;
	virtual bool doAdd(CLChannel* ch) = 0;
	virtual bool doRemove(CLChannel* ch) = 0;
	virtual bool doModify(CLChannel* ch) = 0;
};
} // neo

#endif // _CL_POLLER_HXX_

